<!DOCTYPE html>
<html>
    <head></head>
    <body>
            //将窗口移动到屏幕左上角 window.moveTo(0,0);
            //将窗向下移动 100 像素 window.moveBy(0,100);
            //将窗口移动到(200,300) window.moveTo(200,300);
            //将窗口向左移动 50 像素 window.moveBy(-50,0);
        <script>
        var leftPos = (typeof window.screenLeft == "number") ?
                  window.screenLeft : window.screenX;
        var topPos = (typeof window.screenTop == "number") ?
                  window.screenTop : window.screenY;    
        </script>
    </body>
</html>